Emergency assistance calling for voice over ip communications systems

ABSTRACT

In accordance with one aspect of the invention, a process for handling emergency calls from a caller in a voice over IP system is described. The process involves receiving a routing request message including a caller identifier and a callee identifier. The process also involves setting an emergency call flag active in response to the callee identifier matching an emergency call identifier pre-associated with the caller. The process further involves producing an emergency response center identifier in response to the emergency call identifier. The process also involves determining whether the caller identifier is associated with a pre-associated direct inward dialing (DID) identifier. The process further involves producing a direct inward dialing (DID) identifier for the caller by associating a temporary DID identifier with the caller identifier when the emergency call flag is active and it is determined that the caller has no pre-associated DID. The process also involves producing a routing message including the emergency response center identifier and the temporary DID identifier for receipt by a routing controller operable to cause a route to be established between the caller and the emergency response center.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No. 12/532,989, filed Mar. 5, 2010, which is a national phase entry of PCT/CA2008/00545, filed Mar. 20, 2008, which claims priority to U.S. Provisional Application No. 60/907,224, filed Mar. 26, 2007, all of which are incorporated in their entirety.

BACKGROUND OF THE INVENTION Field of the Invention

This invention relates to emergency assistance calling, voice over internet protocol communications and methods and apparatus for emergency assistance calling for voice over IP data communications.

An essential feature of traditional telephone systems (PSTN) is the ability of its subscribers to dial a universal emergency number (911 in North America) to access a host of emergency services such as fire, police and ambulance. Because of the hierarchical nature of telephone networks and numbering schemes, a call coming from a specific telephone number on the PSTN network is automatically routed to a nearest Emergency Response Center (ERC) based on the area code and exchange code contained in the specific telephone number. Normally, the specific telephone number will be compliant with the E.164 standard set by the International Telecommunication Union. When the call comes into the ERC, call information presended the ERC operator includes the phone number, and where available, the address associated with this phone number.

Since the late 1990s, an enhanced emergency service (E911) was mandated for PSTN and cellular carriers in North America and elsewhere. In particular, with this enhanced service the information automatically provided to the ERC includes the physical location of the person calling, even where the caller is using a cellular telephone. Moreover, a callback functionality is integrated into E911-compliant systems allowing an ERC operator to call back the person who placed the emergency call even if the original phone call was disconnected or if the calling line became busy.

In the realm of VoIP networks, implementation of 911 and E911 services often presents significant problems.

Even to provide basic 911 services, VoIP systems present a number of problems because they do not employ hierarchical numbering schemes, and the phone numbers assigned to VoIP system subscribers, while still in the E.164 format, do not actually reflect the subscribers physical location via area code and exchange codes. As a result, a VoIP provider is not able to automatically route an emergency call to an ERC nearest to the subscriber. Because VoIP subscriber phone numbers are assigned from a bulk of phone numbers that VoIP providers purchase from wireline PSTN carriers, a VoIP 911 emergency services call coming into the ERC is not associated with a subscriber address that can be accessed by the ERC operator.

In addition, because VoIP systems are not based on the Signaling System 7 (SS7) protocol, they do not natively support special short phone numbers such as 911. In particular, they do not natively support variable length phone number dialing, or dynamic translation of dialed universal phone numbers into actual destination phone numbers based on user attributes such as location or service type.

VoIP systems are also typically not able to comply with E911 service requirements, for the same reasons they are not able to comply with regular 911 services.

In accordance with one aspect of the invention, there is provided a process for handling emergency calls from a caller in a voice over IP system. The method involves receiving a routing request message including a caller identifier and a callee identifier. The method also involves setting an emergency call flag active in response to the callee identifier matching an emergency call identifier pre-associated with the caller. The method further involves producing an emergency response center identifier in response to the emergency call identifier. The method also involves determining whether the caller identifier is associated with a pre-associated direct inward dialing (DID) identifier. The method further involves producing a direct inward dialing (DID) identifier for the caller by associating a temporary DID identifier with the caller identifier when the emergency call flag is active and it is determined that the caller has no pre-associated DID identifier. The method also involves producing a routing message including the emergency response center identifier and the temporary DID identifier for receipt by a routing controller operable to cause a route to be established between the caller and the emergency response center.

Setting the emergency call flag active may involve retrieving a dialing profile associated with the caller and setting the emergency call flag active when the contents of ˜n emergency call identifier field of the dialing profile match the callee identifier.

Determining whether the caller identifier is associated with a pre-associated DID identifier may involve searching a database for a DID record associating a DID identifier with the caller and determining that the caller identifier is associated with a pre-associated DID identifier when the record associating a DID identifier with the caller is found.

Associating a pre-assigned DID identifier with the caller identifier may involve copying the pre-associated DID identifier from the DID record to a DID identifier buffer.

Producing the routing message may involve causing the contents of the DID identifier buffer to define the DID identifier in the routing message.

Determining whether the caller identifier is associated with a pre-associated DID identifier may involve searching a database for a DID record associating a DID identifier with the caller and determining that the caller identifier is not associated with a pre-associated DID identifier when a record associating a DID identifier with the caller is not found.

Associating a temporary DID identifier with the caller identifier may involve associating with the caller identifier a DID identifier from a pool of predetermined DID identifiers.

Associating the DID identifier from the pool may involve associating a temporary DID record with the caller, the temporary DID record having a DID identifier field populated with the DID identifier from the pool.

Associating the DID identifier from the pool may involve copying the DID identifier from the temporary DID record to a DID identifier buffer.

The method may involve canceling the temporary DID record after a predefined period of time.

Producing the emergency response center identifier may involve obtaining an emergency response center identifier from an emergency response center field of the dialing profile associated with the caller.

Obtaining may involve copying an emergency response center identifier from the dialing profile associated with the caller to a routing message buffer such that the emergency response center identifier is included in the routing message.

Producing the routing message may involve causing the routing message to specify a maximum call time for the emergency call, the maximum call time exceeding a duration of an average non-emergency telephone call.

In accordance with another aspect of the invention, there is provided an apparatus for handling emergency calls from a caller in a voice over IP system. The apparatus includes provisions for receiving a routing request message including a caller identifier and a callee identifier. The apparatus also includes setting provisions for setting an emergency call flag active in response to the callee identifier matching an emergency call identifier pre-associated with the caller. The apparatus further includes provisions for producing an emergency response center identifier in response to the emergency call identifier. The apparatus also includes provisions for determining whether the caller identifier is associated with a pre-associated direct inward dialing (DID) identifier. The apparatus further includes provisions for producing a direct inward dialing (DID) identifier for the caller including provisions for associating a temporary DID identifier with the caller identifier in response to the emergency call flag being active and the caller identifier not being pre-associated with direct inward dialing identifier. The provisions for producing a direct inward dialing (DID) identifier for the caller further include provisions for associating a pre-assigned DID identifier with the caller identifier when the caller identifier has no pre-associated direct inward dialing identifier. The apparatus also includes provisions for producing a routing message including the emergency response center identifier and the temporary DID identifier for receipt by a routing controller operable to cause a route to be established between the caller and the emergency response center.

The apparatus may further include provisions for accessing a database of dialing profiles associated with respective subscribers to the system, each of the dialing profiles including an emergency call identifier field and an emergency call center field and the setting provisions may comprise provisions for retrieving a dialing profile associated with the caller and for setting the emergency call flag active when the contents of the emergency call identifier field of the dialing profile match the callee identifier.

The apparatus may further include database accessing provisions for accessing a database including direct inward dialing (DID) records associated with at least some subscribers to the system, each of the direct inward dialing records comprising a system username and a direct inward dialing number, and wherein the determining provisions comprise searching provisions for searching a database for a DID record associating a DID identifier with the caller. The determining provisions may be operably configured to determine that the caller identifier is associated with a pre-associated DID identifier when a record associating a DID identifier with the caller is found.

The apparatus may further include a DID identifier buffer and the provisions for associating a pre-assigned DID identifier with the caller identifier may comprise provisions for copying the pre-associated DID identifier from the DID record to the DID identifier buffer.

The provisions for producing the routing message may include provisions for causing the contents of the DID identifier buffer to define the DID identifier in the routing message.

The apparatus may further include database accessing provisions for accessing a database including direct inward dialing records associated with at least some subscribers to the system, each of the direct inward dialing records comprising a system username and a direct inward dialing number and the determining provisions may comprise searching provisions for searching a database for a DID record associating a DID identifier with the caller and wherein the determining provisions may be operably configured to determine that the caller identifier is not associated with a pre-associated DID identifier when a record associating a DID identifier with the caller is not found.

The apparatus may further include provisions for accessing a pool of predetermined DID identifiers and the provisions for associating a temporary DID identifier with the caller identifier may comprise provisions for associating a DID identifier from the pool of pre-determined DID identifiers with the caller identifier.

The provisions for associating the DID identifier from the pool may include provisions for associating a temporary DID record with the caller, the temporary DID record having a DID identifier field populated with the DID identifier from the pool.

The provisions for associating the DID identifier may include provisions for copying the DID identifier from the temporary DID record to a DID identifier buffer.

The apparatus may further include provisions for canceling the temporary DID record after a period of time.

The provisions for producing the emergency response center identifier may include provisions for obtaining an emergency response center identifier from an emergency response center field of the dialing profile associated with the caller.

The apparatus may include a routing message buffer and the provisions for obtaining may include provisions for copying the contents of the emergency response center field of the dialing profile associated with the caller to the routing message buffer such that the contents of the emergency response center field are included in the routing message.

The provisions for producing the routing message may include provisions for causing the routing message to include a maximum call time for the emergency call, the maximum call time exceeding a duration of an average non-emergency telephone call.

In accordance with another aspect of the invention, there is provided an apparatus for handling emergency calls from a caller in a voice over IP system. The apparatus includes an processor circuit operably configured to receive a routing request message including a caller identifier and a callee identifier. The processor circuit is also operably configured to set an emergency call flag active in response to the callee identifier matching an emergency call identifier pre-associated with the caller. The processor circuit is further operably configured to produce an emergency response center identifier in response to the emergency call identifier and to determine whether the caller identifier is associated with a pre-associated direct inward dialing (DID) identifier. The processor circuit is also operably configured to produce a direct inward dialing (DID) identifier for the caller by associating a temporary DID identifier with the caller identifier when the emergency call flag is active and it is determined that the caller identifier has no pre-associated DID identifier. The processor circuit is further operably configured to produce a routing message including the emergency response center identifier and the temporary DID identifier for receipt by a routing controller operable to cause a route to be established between the caller and the emergency response center.

The processor circuit may be operably configured to retrieve a dialing profile associated with the caller and to set the emergency call flag active when the contents of an emergency call identifier field of the dialing profile match the callee identifier.

The processor circuit may be operably configured to search a database for a DID record associating a DID identifier with the caller and to determine that the caller identifier is associated with a pre-associated DID identifier when the record associating a DID identifier with the caller is found.

The processor circuit may be operably configured to copy the pre-associated DID identifier from the DID record to a DID identifier buffer.

The processor circuit may be operably configured to cause the contents of the DID identifier buffer to define the DID identifier in the routing message.

The processor circuit may be operably configured to search a database for a DID record associating a DID identifier with the caller and to determine that the caller identifier is not associated with a pre-associated DID identifier when a record associating a DID identifier with the caller is not found.

The processor circuit may be operably configured to associate with the caller identifier a DID identifier from a pool of pre-determined DID identifiers.

The processor circuit may be operably configured to associate a temporary DID record with the caller, the temporary DID record having a DID identifier field populated with the DID identifier from the pool.

The processor circuit may be operably configured to copy the DID identifier from the temporary DID record to a DID buffer.

The processor circuit may be operably configured to cancel the temporary DID record after a period of time.

The processor circuit may be operably configured to obtain an emergency response center identifier from an emergency response center field of the dialing profile associated with the caller.

The apparatus may further a routing message buffer and the processor circuit may be operably configured to copy an emergency response center identifier from the dialing profile associated with the caller to the routing message buffer such that the emergency response center identifier is included in the routing message.

The processor circuit may be operably configured to cause the routing message to include a maximum call time for the emergency call, the maximum call time exceeding a duration of an average non-emergency telephone call.

In accordance with another aspect of the invention, there is provided a computer readable medium encoded with codes for directing a processor circuit to handle emergency calls from callers in a voice over IP system. The codes direct the processor circuit to receive a routing request message including a caller identifier and a callee identifier. The codes also direct the processor circuit to set an emergency call flag active in response to the callee identifier matching an emergency call identifier pre-associated with the caller. The codes further direct the processor circuit to produce an emergency response center identifier in response to the emergency call identifier. The codes also direct the processor circuit to determine whether the caller identifier is associated with a pre-associated direct inward dialing (DID) identifier. The codes further direct the processor circuit to produce a direct inward dialing (DID) identifier for the caller by associating a temporary DID identifier with the caller identifier when the emergency call flag is active and it is determined that the caller identifier has no pre-associated DID identifier. The codes also direct the processor circuit to produce a routing message including the emergency response center identifier and the temporary DID identifier for receipt by a routing controller operable to cause a route to be established between the caller and the emergency response center.

BRIEF DESCRIPTION OF THE DRAWINGS

In drawings which illustrate embodiments of the invention,

FIG. 1 is a block diagram of a system according to a first embodiment of the invention;

FIG. 2 is a block diagram of a caller VoIP telephone according to the first embodiment of the invention;

FIG. 3 is a schematic representation of a SIP Invite message transmitted between the caller telephone and a call controller (CC) shown in FIG. 1;

FIG. 4 is a block diagram of the call controller shown in FIG. 1;

FIG. 5 is a flowchart of a process executed by the call controller shown in FIG. 1;

FIG. 6 is a schematic representation of a routing controller (RC) Request message produced by the call controller shown in FIG. 1;

FIG. 7 is a block diagram of a routing controller (RC) processor circuit of the routing controller shown in FIG. 1;

FIGS. 8A-8D are flowcharts of a RC Request message handler executed by the RC processor circuit shown in FIG. 7;

FIG. 9 is a tabular representation of a dialing profile stored in a database accessible by the RC shown in FIG. 1;

FIG. 10 is a tabular representation of a dialing profile for a Vancouver caller using the caller telephone shown in FIG. 1;

FIG. 10A is a tabular representation of a dialing profile for the Emergency Response Center subscriber shown in FIG. 1;

FIG. 11 is a tabular representation of a dialing profile for the Calgary subscriber shown in FIG. 1;

FIG. 12 is a tabular representation of a dialing profile for the London subscriber shown in FIG. 1;

FIG. 13 is a tabular representation of a DID bank table record stored in the database shown in FIG. 1;

FIG. 13A is a tabular representation of an exemplary DID bank table record for the Vancouver subscriber;

FIG. 13B is a tabular representation of an exemplary DID bank table record for the Calgary subscriber;

FIG. 14 is a tabular representation of an exemplary DID bank table record for the London subscriber;

FIG. 15 is a tabular representation of a routing message buffer for holding a routing message to be transmitted from the RC to the call controller shown in FIG. 1;

FIG. 16 is a tabular representation of a routing message for routing a call to the Emergency Response Center;

FIG. 16A is a tabular representation of a routing message for routing a call to the London subscriber;

FIG. 17 is a tabular representation of a prefix to supernode table record stored in the database shown in FIG. 1;

FIG. 18 is a tabular representation of a prefix to supernode table record that would be used for the London subscriber;

FIG. 19 is a tabular representation of a master list record stored in a master list table in the database shown in FIG. 1;

FIG. 20 is a tabular representation of an exemplary populated master list record;

FIG. 21 is a tabular representation of a suppliers list record stored in the database shown in FIG. 1;

FIG. 22 is a tabular representation of a specific supplier list record for a first supplier;

FIG. 23 is a tabular representation of a specific supplier list record for a second supplier;

FIG. 24 is a tabular representation of a specific supplier list record for a third supplier;

FIG. 25 is a tabular representation of a routing message buffer for holding a routing message identifying a plurality of possible suppliers that may carry the call;

FIG. 26 is a tabular representation of a call block table record;

FIG. 27 is a tabular representation of a call block table record for the Calgary subscriber;

FIG. 28 is a tabular representation of a call forwarding table record;

FIG. 29 is a tabular representation of an exemplary call forwarding table record specific to the Calgary subscriber;

FIG. 30 is a tabular representation of a voicemail table record specifying voicemail parameters to enable the caller to leave a voicemail message for the callee;

FIG. 31 is a tabular representation of an exemplary voicemail table record for the Calgary subscriber;

FIG. 32 is a tabular representation of an exemplary routing message, held in a routing message buffer, indicating call forwarding numbers and a voicemail server identifier;

FIG. 33 is a tabular representation of a SIP Bye message transmitted from any of the telephones to the call controller;

FIG. 34 is a tabular representation of a SIP Bye message sent to the call controller from the callee or caller gateway;

FIG. 35 is a flowchart of a process executed by the call controller for producing a RC Call Stop message in response to receipt of a SIP Bye message;

FIG. 36 is a tabular representation of an exemplary RC Call Stop message;

FIG. 37 is a tabular representation of an exemplary RC Call Stop message for the Calgary subscriber;

FIG. 38 is a schematic representation of messages exchanged during a process for establishing audio paths between telephones and a media relay.

DETAILED DESCRIPTION

Referring to FIG. 1, a system for making voice over IP telephone calls including emergency calls is shown generally at 10. The system includes a first supernode shown generally at 11 and a second supernode shown generally at 21. The first supernode 11 is located in a geographical area, such as Vancouver B.C., for example and the second supernode 21 is located in London, England, for example. Different supernodes may be located in different geographical regions throughout the world to provide telephone service to subscribers in respective regions. These supernodes may be in communication with each other through high speed/high data throughput links including optical fiber, satellite and/or cable links, for example, forming a system backbone. These supernodes may alternatively or in addition be in communication with each other through conventional Internet services. In the embodiment shown, data communication media for providing for data communications between the first and second supernodes 11 and 21 are shown generally at 23 and may include very high speed data links, for example.

In the embodiment shown, the Vancouver supernode 11 provides telephone service to a geographical region comprising Western Canadian customers from Vancouver Island to Ontario and includes a Vancouver subscriber, a Calgary subscriber and an emergency response center (ERC) that is also a subscriber. The second supernode 21 may be located in London, England, for example, to service London and Glasgow subscribers, 22 and 25, for example through their own service providers 9 and 29. As will be seen below however, the emergency response center need not be a subscriber.

Other supernodes similar to the type shown may also be employed within the geographical area serviced by a supernode, to provide for call load sharing, for example within a region of the geographical area serviced by the supernode. However, in general, all supernodes are similar and have the properties described below in connection with the Vancouver supernode 11.

In this embodiment, the Vancouver supernode includes a call controller (CC) 14, a outing controller (RC) 16, a database 18 and a media relay (MR) 17. Subscribers such as the Vancouver subscriber, the Calgary subscriber and the Emergency Response Center subscriber communicate with the Vancouver supernode 11 using their own Internet Service Providers (ISPs) 13, 19 and 31 respectively which route Internet Protocol (IP) traffic from these subscribers to the Vancouver Supernode over the Internet. To these subscribers the Vancouver supernode 11 is accessible through their ISP at a pre-determined IP address or a fully qualified domain name (FQDN). The subscriber in the city of Vancouver uses a telephone 12 that is capable of communicating with the Vancouver supernode 11 using Session Initiation Protocol (SIP) messages, and the Calgary and Emergency Response Center subscribers use similar telephones 15 and 33 respectively, to communicate with the Vancouver supernode from their locations. The London supernode 21 also has a call controller 24, a routing controller 26 and a database 28 and functions in a manner similar to the Vancouver supernode 11.

It should be noted that throughout the description of the embodiments of this invention, the IP/UDP addresses of all elements such as the caller and callee telephones, call controller, media relay, and any others, will be assumed to be valid IP/UDP addresses directly accessible via the Internet or a private IP network, for example, depending on the specific implementation of the system. As such, it will be assumed, for example, that the caller and callee telephones will have IP/UDP addresses directly accessible by the call controllers and the media relays on their respective supernodes, and those addresses will not be obscured by Network Address Translation (NAT) or similar mechanisms. In other words, the IP/UDP information contained in SIP messages (for example the SIP Invite message or the RC Request message which will be described below) will match the IP/UDP addresses of the IP packets carrying these SIP messages.

It will be appreciated that in many situations, the IP addresses assigned to various elements of the system may be in a private IP address space, and thus not directly accessible from other elements. Furthermore, it will also be appreciated that NAT is commonly used to share a “public” IP address between multiple devices, for example between home PCs and IP telephones sharing a single Internet connection. For example, a home PC may be assigned an IP address such as 192.168.0.101 and a Voice over IP telephone may be assigned an IP address of 192.168.0.103. These addresses are located in so called “non-routable” (IP) address space and cannot be accessed directly from the Internet. In order for these devices to communicate with other computers located on the Internet, these IP addresses have to be converted into a “public” IP address, for example 24.10.10.123 assigned by the Internet Service Provider to the subscriber, by a device performing NAT, typically a home router. In addition to translating the IP addresses, NAT typically also translates UDP port numbers, for example an audio path originating at a VoIP telephone and using a UDP port 12378 at its private IP address, may have been translated to UDP port 23465 associated with the public IP address of the NAT device. In other words, when a packet originating from the above VoIP telephone arrives at an Internet-based supernode, the source IP/UDP address contained in the IP packet header will be 24.10.10.123:23465, whereas the source IP/UDP address information contained in the SIP message inside this IP packet will be 192.168.0.103:12378. The mismatch in the IP/UDP addresses may cause a problem for SIP-based VoIP systems because, for example, a supernode will attempt to send messages to a private address of a telephone—the messages will never get there.

It will be appreciated that a number of methods are available to overcome this problem. For example, the SIP NATHelper open source software module may run on the supernode to correlate public IP/UDP address contained in the headers of the IP packets arriving from SIP devices with private IP/UDP addresses in the SIP messages contained in these packets. Therefore, the embodiments of the invention described below will function whether or not any of the elements of the system are located behind NAT devices that obscure their real IP/UDP addresses.

Referring to FIG. 1, in an attempt to make a regular call by the Vancouver telephone 12 to the London telephone 22, for example, the Vancouver telephone sends a SIP Invite message to the Vancouver supernode 11 and in response, the call controller 14 sends an RC Request message to the routing controller 16 which makes various enquiries of the database 18 to produce a routing message which is sent to the call controller. The call controller 14 then causes a communications link, including audio paths, to be established through the media relay 17 which may include the same Vancouver supernode 11, a different supernode or a communications supplier gateway, for example, to carry voice traffic to and from the call recipient or callee.

In an attempt to make an emergency call, generally the call is made by dialing a short number such as 911 and the call is routed to an emergency response center (ERC) associated with the caller such as the emergency response center associated with the telephone 33. However, as will be appreciated from the description below, this system will permit emergency calls originating from subscribers associated with one supernode to be received by emergency response centers associated with a different supernode, if necessary.

Subscriber Telephone

Referring to FIG. 2, in this embodiment, the telephone 12 includes a processor circuit shown generally at 30 comprising a microprocessor 32, program memory 34, an input/output (I/O) interface 36, parameter memory 38 and temporary memory 40. The program memory 34, I/O interface 36, parameter memory 38 and temporary memory 40 are all in communication with the microprocessor 32. The I/O interface 36 has a dial input 42 for receiving a dialed telephone number from a keypad. for example, or from a voice recognition unit or from pre-stored telephone numbers stored in the parameter memory 38, for example. For simplicity, a box labeled dialing functions 44 represents any device capable of informing the microprocessor 32 of a callee identifier, e.g., a callee telephone number.

The processor 32 stores the callee identifier in a dialed number buffer 41. Where the callee is the London subscriber, the callee identifier may be 4401 1062 4444, for example, identifying the London subscriber or the callee identifier may be a standard telephone number, or where the callee is the Emergency Response Center, the callee identifier may be 911, for example.

The I/O interface 36 also has a handset interface 46 for receiving and producing signals from and to a handset that receives user's speech to produce audio signals and produces sound in response to received audio signals. The handset interface 46 may include a BLUETOOTH™ wireless interface, a wired interface or speakerphone, for example. The handset 45 acts as a termination point for an audio path (not shown) which will be appreciated later.

The I/O interface 36 also has a network interface 48 to an IP network, and is operable, for example, to connect the telephone to an ISP via a high speed Internet connection. The network interface 48 also acts as a part of the audio path, as will be appreciated later.

The parameter memory 38 has a username field 50, a password field 52, an IP address field 53 and a SIP proxy address field 54. The username field 50 is operable to hold a username associated with the telephone 12, which in this case is 2001 1050 8667. The username is assigned upon subscription or registration into the system and, in this embodiment includes a twelve digit number having a prefix 61, a country code 63, a dealer code 70 and a unique number code 74. The prefix 61 is comprised of the first or left-most digit of the username in this embodiment. The prefix may act as a continent code in some embodiments, for example. The country code 63 is comprised of the next three digits. The dealer code 70 is comprised of the next four digits and the unique number code 74 is comprised of the last four digits. The password field 52 holds a password of up to 512 characters, in this example. The IP address field 53 stores an IP address of the telephone 30, which for this explanation is 192.168.0.20. The SIP proxy address field 54 stores an IP address of a SIP proxy which may be provided to the telephone 12 through the network interface 48 as part of a registration procedure, for example.

The program memory 34 stores blocks of codes for directing the microprocessor 32 to carry out the functions of the telephone 12, one of which includes a firewall block 56 which provides firewall functions to the telephone, to prevent unauthorized access through the network interface 48 to the microprocessor 32 and memories 34, 38 and 40. The program memory 34 also stores codes 57 for establishing a call ID. The call ID codes 57 direct the microprocessor 32 to produce call identifiers, that may, for example have the format of a hexadecimal string and an IP address of the telephone stored in IP address field 53. Thus, an exemplary call identifier for a call might be FF10 @ 192.168.0.20.

Generally, in response to activating the handset 45 and using the dialing function 44, the microprocessor 32 produces and sends a SIP Invite message 59 as shown in FIG. 3, to the routing controller (RC) 14 shown in FIG. 1.

Referring to FIG. 3, the SIP Invite message includes a caller identifier field 60, a callee identifier field 62, a digest parameters field 64, a call ID field 65, a caller IP address field 67 and a caller UDP port field 69. In this embodiment, the caller identifier field 60 includes the username 2001 1050 8667, which is the username stored in the username field 50 of the parameter memory 38 in the Vancouver telephone 12 shown in FIG. 2. In addition, as an example, referring back to FIG. 3, where the call is a normal, non-emergency call to the London subscriber the callee identifier field 62 includes the username 4401 1062 4444 which is the dialed number of the London subscriber stored in the dialed number buffer 41 shown in FIG. 2. The digest parameters field 64 includes digest parameters and the call ID field 65 includes a code comprising a generated prefix code (FF10, for example) and a suffix which is the IP address of the telephone 12 stored in the IP address field 53. The IP address field 67 and UDP port field 69 define a socket for audio communications. The IP address field 67 holds the IP address assigned to the telephone, in this embodiment 192.168.0.20, and the caller UDP port field 69 includes a UDP port identifier identifying a UDP port at which the audio path will be terminated at the caller's telephone.

Call Controller

Referring to FIG. 4, a call controller circuit of the call controller 14 (FIG. 1) is shown in greater detail at 100. The call controller circuit 100 includes a microprocessor 102, program memory 104, random access memory 105 and an I/O interface 106. The call controller circuit 100 may include a plurality of microprocessors, a plurality of program memories and a plurality of I/O interfaces to be able to handle a large volume of calls. However, for simplicity, the call controller circuit 100 will be described as having only one microprocessor, program memory and I/O interface, it being understood that there may be more.

Generally, the I/O interface 106 includes an input 108 for receiving messages, such as the SIP Invite message shown in FIG. 3, from the telephone 12 shown in FIG. 2. The 110 interface 106 also has an RC Request message output 110 for transmitting an RC Request message to the routing controller 16 in FIG. 1, an RC message input 112 for receiving routing messages from the RC 16, a MR output 114 for transmitting messages to the media relay 17 (FIG. 1) to advise the media relay to establish an audio path, and a MR input 116 for receiving messages from the media relay to which a message has been sent to attempt to establish the audio path. The 110 interface 106 further includes a SIP output 118 for transmitting SIP messages to the telephone 12 (FIG. 2) to advise the telephone of the IP address of the media relay 17 (FIG. 1) which will establish the audio path.

While certain inputs and outputs have been shown as separate, it will be appreciated that some may be associated with a single IP address and TCP or UDP port. For example, the messages sent and received from the RC 16 may be transmitted and received at the same single IP address and TCP or UDP port.

The program memory 104 of the call controller circuit 100 includes blocks of code for directing the microprocessor 102 to carry out various functions of the call controller 14. For example, these blocks of code include a first block 120 for causing the call controller circuit 100 to execute a SIP Invite to RC request process to produce a RC Request message in response to a received SIP Invite message. In addition, there is a Routing Message to Media Relay message block 122 which causes the call controller circuit 100 to produce an MR Query message in response to a received routing message from the routing controller 16.

Referring to FIG. 5, the SIP Invite-to-RC Request process is shown in more detail at 120. On receipt of a SIP Invite message of the type shown in FIG. 3, block 132 of FIG. 5 directs the call controller circuit 100 of FIG. 4 to authenticate the user operating the telephone from which the SIP Invite message originated. This may be done, for example, by prompting the user for a password by sending a message back to the caller telephone 12 in FIG. 1, which is interpreted at the telephone as a request for password entry or the password may automatically be sent to the call controller 14 from the telephone, in response to the message. The call controller 14 may then make enquiries of the database 18 to determine whether or not the user's password matches a password stored in the database. Various functions may be used to pass encryption keys or hash codes back and forth to ensure the secure transmission of passwords. Authentication may be bypassed when the call is to the ERC.

Should the authentication process fail, the call controller circuit 100 is directed to an error handling block 134 which causes messages to be displayed at the caller telephone 12 to indicate that there was an authentication error. If the authentication process is successful, block 131 directs the call controller circuit 100 of FIG. 4 to determine whether or not the contents of the caller identifier field 60 of the SIP Invite message shown in FIG. 3 is a validly formatted IP address. If it is a valid IP address, then block 133 of FIG. 5 directs the call controller circuit 100 of FIG. 4 to associate a type code with the call to indicate that the call type is a third party invite.

If at block 131 the caller identifier field 60 contents do not identify an IP address (for example, they may identify a PSTN number or Emergency Calling short number such as 911), then block 135 directs the call controller circuit 100 to associate a type code with the call to indicate the call type is a regular invite. Then, block 136 directs the call controller circuit 100 to establish a call ID by reading the call ID provided in the call ID field 65 of the SIP Invite message from the telephone 12, and at block 138 the call controller circuit is directed to produce a routing request message of the type shown in FIG. 6 that includes that call ID. Block 139 of FIG. 5 then directs the call controller circuit 100 of FIG. 4 to send the RC Request message to the routing controller 16 of FIG. 1.

Referring to FIG. 6, a routing request message is shown generally at 150 and includes a caller identifier field 152, a callee identifier field 154, a digest field 156, a call ID field 158 and a type field 160. The caller, callee, digest, and call ID fields 152, 154, 156 and 158 contain copies of the caller, callee, digest parameters and call ID fields 60, 62, 64 and 65 of the SIP Invite message shown in FIG. 3. The type field 160 contains the type code established at blocks 133 or 135 of FIG. 5 to indicate whether the call is from a third party or system subscriber, respectively. For a normal non-emergency call the callee identifier field 154 may include a PSTN number or a system subscriber username as shown, for example. For an emergency call, the callee identifier field 154 includes the Emergency short number 911, in this embodiment.

Routing Controller

Referring to FIG. 7, the routing controller 16 is shown in greater detail and includes an RC processor circuit shown generally at 200. The RC processor circuit 200 includes a processor 202, program memory 204, a table memory 206, a DID identifier buffer 203, a caller ID buffer 205, a callee 10 buffer 209, an emergency call flag 211, a DID identifier buffer 203, a and an I/O interface 20B, all in communication with the processor. (As earlier indicated, there may be a plurality of processors (202), memories (204), etc.) Separate caller ID buffers 205, callee id buffers 209 and emergency call flags 211 are instantiated for each call and are associated with respective call IDs.

The I/O interface 20B includes a database output port 210 through which a request to the database 1B (FIG. 1) can be made and includes a database response port 212 for receiving a reply from the database. The I/O interface 20B further includes an RC Request message input 214 for receiving the routing request message from the call controller 14. Thus, the routing controller receives a routing request message including a caller identifier and a callee identifier. The I/O interface 20B further includes a routing message output 216 for sending a routing message back to the call controller 14.

The program memory 204 includes blocks of codes for directing the RC processor circuit 200 to carry out various functions of the routing controller 16. One of these blocks includes an RC Request message handler process 250 which directs the RC processor circuit to produce a routing message in response to a received routing request message of the type shown at 150 in FIG. 6. The RC Request message handler process is shown in greater detail at 250 in FIGS. 8A through 8D.

RC Request Message Handler

Referring to FIG. 8A, the routing request message handler 250 begins with a first block 252 that directs the RC processor circuit 200 (FIG. 7) to store the contents of the RC Request message 150 (FIG. 6) in the callee ID buffer 209 and the caller buffer 205 buffers for separately storing the contents of the callee field (154 in FIG. 6) and the caller field (152 in FIG. 6) respectively of the RC Request message. Block 254 then directs the RC processor circuit 200 to use the contents of the caller field (152 in FIG. 6) in the RC Request message 150, to search the database 18 shown in FIG. 1 and retrieve a dialing profile associated with the caller.

Referring to FIG. 9, a dialing profile is shown generally at 256 and includes system fields including a username field 258, a domain field 260, a national dialing digits (NDD) field 262, an International dialing digits (IDD) field 264, a country code field 266, a local area codes field 267, a caller minimum local length field 268, a caller maximum local length field 270, a reseller field 273, a user address field 275, an emergency call identifier field 277 and an emergency response center (ERC) field 279.

An exemplary dialing profile for the Vancouver subscriber is shown generally at 276 in FIG. 10 and indicates that the username field 258 includes the username 2001 1050 8667 which is the same as the contents of the username field 50 in the Vancouver telephone 12 shown in FIG. 2.

Referring back to FIG. 10, the domain field 260 includes a domain name as shown at 282, including a supernode type identifier 284, a location code identifier 286, a system provider identifier 288 and a top level domain identifier 290, identifying a domain or supernode associated with the user identified by the contents of the username field 258.

In this embodiment, the supernode type identifier 284 includes the code “sp” identifying a supernode and the location code identifier 286 identifies the supernode as being in Vancouver (yvr). The system provider identifier 288 identifies the company supplying the service and the top level domain identifier 290 identifies the “com” domain.

The NDD field 262 in this embodiment includes the digit “1” and in general includes a digit specified by the International Telecommunications Union—Telecommunications Standardization Sector (ITU-T) E.164 Recommendation which assigns national dialing digits to certain countries.

The IDD field 264 includes the code 011 and, in general, includes a code assigned by the ITU-T according to the country or geographical location of the subscriber.

The country code field 266 includes the digit “1” and, in general, includes a number assigned by the ITU-T to represent the country in which the subscriber is located.

The local area codes field 267 includes the numbers 604 and 778 and generally includes a list of area codes that have been assigned by the ITU-T to the geographical area in which the subscriber is located. The caller minimum and maximum local number length fields 268 and 270 each hold the number 10 representing minimum and maximum local number lengths permitted in the area code(s) specified by the contents of the local area codes field 267. The reseller field 273 holds a code identifying a retailer of the telephone services, and in the embodiment shown, the retailer is “Klondike”.

The address field 275 holds an address at which the subscriber telephone is normally located. The emergency short number field 277 holds the short emergency number such as “911” that the user is expected to dial in the event of an emergency. The ERG number field 279 holds a full PSTN number associated with an emergency response center that would desirably be geographically nearest to the address specified in the address field 275.

A dialing profile of the type shown at 256 in FIG. 9 is produced whenever a user registers with the system or agrees to become a subscriber to the system. An ERC may register as a user, but need not do so since, as will be appreciated below, provisions are made for making VoIP to PSTN calls which may include calls to an ERC only available via the PSTN. Of importance here is that the contents of the emergency short number field 277 and the contents of the ERC number field 279 are assigned when the user registers with the system and thus it may be said that these numbers are “pre-assigned” to the user before the user makes any calls.

A user wishing to subscribe to the system may contact an office maintained by a system operator. Personnel in the office may ask the user certain questions about his location and service preferences, whereupon tables can be used to provide office personnel with appropriate information to be entered into the username, domain, NDD, IDD, country code, local area codes and caller minimum and maximum local length fields, emergency short number field and ERC number field 258, 260, 262, 264, 266, 267, 268, 270, 277, 279 to establish a dialing profile for the user.

Referring to FIGS. 10A, 11, and 12, dialing profiles for the ERC subscriber, Calgary subscriber, and the London subscriber, respectively for example, are shown.

In addition to creating dialing profiles when a user registers with the system, a direct-in-dial (DID) record of the type shown at 268 in FIG. 13 may optionally be added to a direct-in-dial table in the database 18 to associate the username and a host name of the supernode, with which the user is associated, with an E.164 number on the PSTN network. If the user does not have such an E.164 number, no DID record need be created at this time for that user.

In this embodiment, the DID bank table records include a username field 291, a user domain field 272 and DID identifier field 274, for holding the username, hostname of the supernode and E.164 number respectively. Thus a DID bank table record pre-associates a DID identifier with a user (e.g., caller).

A DID bank table record may also include a creation time field and an expiration time field for use when the DID bank table record is a temporary record as will be explained below.

DID bank table records for the Vancouver, Calgary and London subscribers are shown in FIGS. 13A, 13B, and 14, respectively

In addition to creating dialing profiles and DID records when a user registers with the system, call blocking records of the type shown in FIG. 26, call forwarding records of the type shown in FIG. 28 and voicemail records of the type shown in FIG. 30 may be added to the database 18 when a new subscriber is added to the system.

Referring back to FIG. 8A, after being directed at block 254 to retrieve a dialing profile associated with the caller, such as shown at 276 in FIG. 10, the RC processor circuit (200) is directed to block 255 which causes it to determine whether the contents of the callee 10 buffer 209 shown in FIG. 7 are equal to the contents of the emergency call identifier field 277 of the dialing profile 276 for the caller, shown in FIG. 10. If the contents of the callee 10 buffer 209 are not equal to the contents of the emergency short number field 277, the call is deemed not to be an emergency call and the RC processor circuit 200 is directed to location A in FIG. 88 to carry out further processing on the basis that the call is to be a normal, non-emergency call.

If the contents of the callee 10 buffer 209 match the contents of the emergency call identifier field (277 in FIG. 10), the call is deemed to be an emergency call and block 157 directs the RC processor circuit 200 to set a time to live (TTL) value to a high number such as 9999 to indicate that the call may have a long duration of 9999 seconds, for example. In addition block 157 directs the RC processor circuit 200 to set active the emergency call flag 211 in FIG. 7, to indicate that the call is an emergency call. Then, block 159 directs the RC processor circuit 200 to replace the contents of the callee 10 buffer 209 with the contents of the ERC # field 279 of the caller dialing profile 276 (FIG. 10). Thus, the RC processor circuit produces an emergency response center identifier in response to the emergency call identifier by copying the emergency response center identifier from the ERC field 279 of the dialing profile 276 (FIG. 10) associated with the caller to the callee 10 buffer 209 shown in FIG. 7 so that effectively, the contents of the callee 10 buffer are replaced with the Emergency Response Center number. The RC processor circuit 200 is then directed to location A in FIG. 8B.

In this embodiment, for regular and emergency call processing, beginning at location A in FIG. 8B, the RC processor circuit 200 is directed to perform certain checks on the callee identifier provided by the contents of the callee identifier buffer 209 shown in FIG. 7. Most of these checks are shown in greater detail in FIG. 8B and are used for regular non-emergency call handling. Emergency calls in which the ERC number has been substituted for the short emergency calling number (i.e., 911) will pass all of the checks. Subjecting both emergency and non-emergency calls to these checks enables all calls, whether emergency or non-emergency, to be passed through the same process and, simplifies the introduction of emergency call handling processes into regular call processing routines depicted in FIGS. 8A to 8D. Alternatively, the RC processor circuit may be directed directly from block 159 to block 269 in FIG. 8B whenever the emergency call flag is set, as shown in broken outline in FIG. 8B.

FIG. 8B IDD Testing

Referring to FIG. 8B, to start the first of the checks, the RC processor circuit 200 is directed to a first block 257 that causes it to determine whether a digit pattern of the callee identifier provided in the callee 10 buffer 209 includes a pattern that matches the contents of the IDD field 264 in the caller dialing profile 276 shown in FIG. 10. If so, then block 259 directs the RC processor circuit 200 to set a call type identifier code (not shown) to indicate that the call is a long distance call, e.g., from the Vancouver subscriber to the London subscriber, and block 261 directs the RC processor circuit 200 to produce a reformatted callee identifier by reformatting the current callee identifier into a predetermined target format. In this embodiment, this is done by removing the pattern of digits matching the IDD field contents 264 of the caller dialing profile 276 to effectively shorten the number. Then, block 263 directs the RC processor circuit 200 to determine whether or not the reformatted callee identifier meets criteria establishing it as an E.164 compliant number and if the length does not meet this criteria, block 265 directs the RC processor circuit 200 to send back to the call controller 14 a message indicating that the length of the call identifier is not correct. The process 250 is then ended. At the call controller 14, routines may respond to the incorrect length message by transmitting a message back to the telephone 12 to indicate that an invalid number has been dialed, for example. Thus at the conclusion of block 263 a callee identifier having a pre-defined format should be available.

NDD Testing

Referring back to FIG. 8B, if at block 257, the callee identifier specified by the contents of the callee buffer 209 FIG. 7 does not begin with an IDD, block 381 directs the RC processor circuit 200 to determine whether or not the callee identifier begins with the same NDD code as assigned to the caller. To do this, the RC processor circuit is directed to refer to the caller dialing profile 276 shown in FIG. 10. In the embodiment shown, the NDD code stored in an NDD field 262 is the digit 1. Thus, if the callee identifier begins with the digit 1, the RC processor circuit 200 is directed to block 382 in FIG. 8B.

Block 382 directs the RC processor circuit 200 to examine the callee identifier to determine whether or not digits following the NDD code identify an area code that is the same as any of the area codes identified in the local area codes field 267 of the caller dialing profile 276 shown in FIG. 10. If not, block 384 directs the RC processor circuit 200 to set a call type variable (not shown) to a code indicating the call is a national call. If the digits identify an area code that is the same as a local area code associated with the caller, block 386 directs the RC processor circuit 200 to set the call type variable to indicate that the call type is as a local call, national style. After executing blocks 384 or 386, block 388 directs the RC processor circuit 200 to reformat the callee identifier by removing the national dial digit and prepending a caller country code identified by the country code field 266 of the caller dialing profile 276 shown in FIG. 10. The RC processor circuit 200 is then directed to block 263 to perform the processes described above beginning at block 263. Again, at the conclusion of block 263 a callee identifier having a predefined format should be available.

Area Code Testing

If at block 381 the callee identifier does not begin with an NDD code, block 390 directs the RC processor circuit 200 to determine whether the callee identifier in the callee ID buffer 209 begins with digits that identify the same area code as the caller. Again, the reference for this is the caller profile 276 shown in FIG. 10 and the RC processor circuit 200 determines whether or not the first few digits in the callee identifier identify an area code identified by the local area code field 267 of the caller profile 276. If so, then block 392 directs the RC processor circuit 200 to set the call type to a code indicating the call is a local call and block 394 directs the RC processor circuit 200 to prepend the caller country code to the callee identifier, the caller country code being determined from the country code field 266 in the caller profile 276. The RC processor circuit 200 is then directed to block 263 for processing as described above beginning at block 263. Emergency calls are likely to follow this path since the Emergency Response Center number that supplants the short emergency number (911) will normally be formatted to include an area code, but no IDD or NDD. Again at the conclusion of block 263 a callee identifier having a pre-defined length should be available.

Callee ID Length Testing

If at block 390, the callee identifier does not have the same area code as the caller, as may be the case with non-emergency calls, block 396 directs the RC processor circuit 200 to determine whether the callee identifier in the callee 10 buffer 209 has the same number of digits as the number of digits indicated in either the caller minimum local number length field 268 or the caller maximum local number length field 270 of the caller profile 276 shown in FIG. 10. If so, then block 398 directs the RC processor circuit 200 to set the call type to local and block 400 directs the processor to prepend to the callee identifier the caller country code as indicated by the country code field 266 of the caller profile 276 followed by the caller area code as indicated by the local area code field 267 of the caller profile shown in FIG. 10. The RC processor circuit 200 is then directed to block 263 for further processing as described above beginning at block 263. Again at the conclusion of block 263 a callee identifier having a pre-defined length should be available.

Valid Subscriber Testing

If at block 396, the callee identifier in the callee ID buffer 209 has a length that does not match the length specified by the contents of the caller minimum local number length field 268 or the caller maximum local number length field 270 of the caller profile 276, block 402 directs the RC processor circuit 200 to determine whether or not the callee identifier identifies a valid username. To do this, the RC processor circuit 200 searches through the database 18 of dialing profiles to find a dialing profile having a username field 258 that matches the callee identifier. If no match is found, block 404 directs the RC processor circuit 200 to send an error message back to the call controller (14). If at block 402, a dialing profile having a username field 258 that matches the callee identifier is found, block 406 directs the RC processor circuit 200 to set the call type to a code indicating the call is a network call and the processor is directed to block 275 of FIG. 8A, to continue executing the RC message handler process 250.

From FIG. 8B, it will be appreciated that there are certain groups of blocks of codes that direct the RC processor circuit 200 to determine whether the callee identifier in the callee ID buffer 209 has certain features such as an IDD code, a NDD code, an area code and a length that meet certain criteria and to reformat the callee identifier, as necessary, into a predetermined target format including only a country code, area code, and a normal telephone number, for example, to cause the callee identifier to be compatible with the E.164 standard, in this embodiment. This enables the RC processor circuit 200 to have a consistent format of callee identifiers for use at block 269 in searching through the DID bank table records of the type 268 shown in FIG. 13 to determine how to route calls for subscriber to subscriber calls on the same system. Recall that the ERC may be a subscriber.

Still referring to FIG. 8B, if the length of the reformatted callee identifier meets the length criteria set forth at block 263, block 269 directs the RC processor circuit 200 to determine whether or not the reformatted callee identifier is associated with a direct-in-dial bank (DID) record of the type shown at 268 in FIG. 13.

Exemplary DID records for the Vancouver, Calgary and London subscribers are shown in FIGS. 13A, 13B and 14. The username field 291 and user domain field 272 are as specified in the username and user domain fields 258 and 260 of the corresponding dialing profiles shown in FIGS. 10, 11 and 12 respectively. Referring to FIG. 13A the contents of the DID field 274 include an E.164 telephone number including a country code 293, an area code 295, an exchange code 297 and a number 299. If the user has multiple telephone numbers, then multiple records of the type shown at 276 would be included in the DID bank table in the database 18, each having the same username and user domain, but different DID field 274 contents reflecting the different E.164 telephone numbers associated with that user.

Referring back to FIG. 8B, at block 269, if the RC processor circuit 200 determines that the current, (e.g., reformatted callee identifier produced at block 261) can be found in a record in the DID bank table, then the callee is a subscriber to the system and block 279 directs the RC processor circuit 200 to copy the contents of the corresponding username field 291 from the DID bank table record into the callee ID buffer 209 shown in FIG. 7. Thus, the RC processor circuit 200 locates a subscriber username associated with the reformatted callee identifier. If the call is being made to the Emergency Response Center and the Emergency Response Center (ERC) is a subscriber to the system, a DID record would be found in the DID bank table, otherwise a DID record for the ERC would not be found. Assuming the Emergency Response Center is a subscriber to the system, the RC processor circuit 200 is directed to block 275 at point B in FIG. 8A for further processing now that it is known that the call is essentially a subscriber to subscriber call.

Subscriber to Subscriber Calls Between Different Nodes

Referring back to FIG. 8A, block 275 directs the RC processor circuit 200 to determine whether or not the username stored in the callee ID buffer 209 (in FIG. 7) is associated with the same supernode as the caller. To do this, the RC processor circuit 200 determines whether or not the prefix (i.e., the leftmost digit) of the username stored in the callee ID buffer 209 is the same as the prefix of the username of the caller specified by the caller identifier field 152 of the RC. Request message 150 shown in FIG. 6. If they are not the same, block 277 of FIG. 8A directs the RC processor circuit (200) to set a call type flag (not shown) to indicate that the call is a cross-domain call. Then, block 281 directs the RC processor circuit (200) to determine whether the emergency call flag 211 shown in FIG. 7 has been set and if so, block 283 of FIG. 8A directs the RC processor to determine whether the caller identifier is associated with a pre-associated direct inward dialing (DID) identifier. This is done by searching the DID bank table to attempt to locate a DID record having DID field (274) contents matching the contents of the caller identifier stored in the caller ID buffer (205). If such a DID record is found, the processor circuit 200 has effectively determined that the caller has a pre-associated DID identifier.

If no such DID record is found, the RC processor circuit 200 has effectively determined that the caller has no pre-associated DID identifier. In this case, block 285 then directs the RC processor circuit 200 to produce a DID identifier for the caller by associating a temporary DID identifier with the caller identifier by associating with the caller identifier a DID identifier from a pool of predetermined DID identifiers. This is done by creating and associating with the caller a temporary DID record of the type shown in FIG. 13. The temporary DID record has a DID identifier field 274 populated with the DID identifier from the pool. The DID identifier from the pool may be 1 604 867 5309, for example. The pool may be provided by causing the RC processor circuit 200 to maintain a list of pre-defined DID identifiers and pointers identifying a current read point in the list and a current write point in the list. The current read pointer may be incremented each time the pool is addressed to obtain a temporary DID identifier.

A temporary DID record may be canceled after a pre-defined period of time. For example, the temporary DID identifier records are desirably as shown in FIG. 13 and may further include a creation time field and an expiry time field for holding a creation time value and an expiry time value respectively. The expiry time may be 2 hours after the creation time, for example, such that the temporary DID record is deleted two hours after it is created. A separate process, not shown, may continuously or periodically scan the DID records to determine whether any DID records have expiry times that have been exceeded and if so, cause such temporary DID records to be cancelled or deleted. Thus, the RC processor produces a direct inward dialing identifier for the caller by associating a temporary DID identifier with the caller identifier when the emergency call flag is active and it is determined that the caller has no pre-associated DID identifier, or by associating a DID identifier pre-assigned to the caller identifier.

After a temporary DID record has been created and stored in the DID bank table in the database 18 shown in FIG. 1, or if the caller already had a DID record, block 287 of FIG. 8A directs the RC processor circuit to load the DID identifier buffer 203 with the contents of the field of DID temporary or pre-associated DID record. Then the RC processor circuit loads a routing message buffer with the contents of the DID identifier buffer 203 acting as the caller identifier and the contents of the callee ID buffer 209 as the callee identifier. This will provide for a PSTN call back number to be provided to the emergency response center.

Thus, where the caller identifier has no pre-assigned DID identifier, the RC processor produces a routing message including the emergency response center identifier and the temporary DID identifier for receipt by the routing controller to cause the routing controller to establish a route between the caller and the emergency response center.

Referring to FIG. 15, a routing message buffer is shown generally at 352 and includes a supplier prefix field 354, a delimiter field 356, a callee field 358, at least one route field 360, a time-to-live (TTL) field 362 and a caller ID field 364. The supplier prefix field 354 holds a code for identifying supplier traffic. The delimiter field 356 holds a symbol that delimits the supplier prefix code from the callee field 358 and in this embodiment, the symbol is a number sign (#) as illustrated in FIG. 25. Referring back to FIG. 15, the callee field 358 holds a copy of the contents of the callee ID buffer 209 of FIG. 7. The route field 360 holds a domain name or an IP address of a gateway or supernode that is to carry the call and the TTL field 362 holds a value representing the number of seconds the call is permitted to be active, based on subscriber available minutes and other billing parameters, for example.

Desirably, the time to live field holds a number indicating a maximum call time for the call and where the call is an emergency call, desirably the maximum call time exceeds a duration of an average non-emergency telephone call. The caller ID field 364 holds a caller identifier which in this case, is the temporary or pre-associated DID number from the DID record associated with the caller.

Referring to FIG. 8A and FIG. 16, a routing message produced by the RC processor circuit 200 at block 287 is shown generally at 366 and includes only the callee field 358, route field 360, TTL field 362 and caller ID field 364.

The callee field 358 holds the full username of the callee, and where the call is an emergency call as shown, the full username of the callee is the username of the emergency response center. The route field 360 contains the identification of the domain with which the emergency response center is associated, i.e., sp.yvr.digifonica.com. The TTL field holds the value 9999 set at block 157 in FIG. 8A and the caller ID field 364 holds the DID identifier associated with the caller. Block 380 then directs the RC processor circuit to send the routing message shown in FIG. 16 to the call controller 14 (FIG. 1).

Referring to FIG. 8A, if at block 281, the emergency call flag is not set, the call is not an emergency call, and the RC processor is directed to block 350 which causes it to direct the RC processor circuit 200 to load the routing message buffer with information identifying the supernode in the system with which the callee is associated and to set a time to live for the call to a high value such as 9999. The supernode, with which the callee is associated, is determined by using the callee username stored in the callee ID buffer 209 to address a supernode table having records of the type as shown at 370 in FIG. 17.

Referring to FIG. 17, each prefix to a supernode table record 370 has a prefix field 372 and a supernode address field 374. The prefix field 372 includes the first n digits of the callee identifier. In this case n=1. The supernode address field 374 holds a code representing the IP address or a fully qualified domain name (FQDN) of the supernode associated with the code stored in the prefix field 372. Referring to FIG. 18, for example, if the prefix is 4, the supernode address associated with that prefix is sp.1hr.digifonica.com, identifying the London supernode (21 in FIG. 1), for example. After the routing message buffer has been loaded with identification of the supernode, block 380 of FIG. 8A directs the RC processor circuit to send the routing message shown in FIG. 16A to the call controller 14 (FIG. 1).

Subscriber to Subscriber Calls within the Same Node

Referring back to FIG. 8A, if at block 275, the callee identifier stored in the callee ID buffer 209 (FIG. 7) has a prefix that identifies the same supernode as that associated with the caller, block 559 directs the RC processor circuit 200 to determine whether or not the emergency call flag 211 of FIG. 7 has been set. If at block 559, the RC processor circuit 200 determines that the emergency call flag 211 is set, the RC processor circuit 200 is directed to resume processing at block 283 to scan the DID bank table to determine whether the caller has a DID record and to assign a temporary DID number if necessary, as described above and then to send a routing message of the type shown in FIG. 16 to the call controller.

If at block 559 the emergency call flag has not been set, regular non-emergency call processing ensues beginning with block 600 which directs the RC processor circuit 200 to use the callee identifier to locate and retrieve a dialing profile for the callee identified by the callee identifier stored in the callee ID buffer 209. The dialing profile is of the type shown in FIG. 9, and may contain data as shown in FIG. 11, for example. In this case the same-node subscriber is the Calgary subscriber. Block 602 of FIG. 8A directs the RC processor circuit 200 to get call block, call forward and voicemail tables from the database 18 based on the username identified in the callee dialing profile retrieved by the RC processor circuit at block 600. Call block, call forward and voicemail tables have records as shown in FIGS. 26, 28 and 30 for example.

Referring to FIG. 26, the call block records include a username field 604 and a block pattern field 606. The username field 604 holds a username matching the username in the username field 258 of the dialing profile (FIG. 9) associated with the callee, and the block pattern field 606 holds one or more E.164-compatible numbers or usernames identifying PSTN telephone numbers or system subscribers from whom the subscriber identified by the contents of the username field 604 does not wish to receive calls.

Referring back to FIG. 8A and referring to FIG. 27, block 608 directs the RC processor circuit 200 to determine whether or not the caller identifier matches a block pattern stored in the block pattern field 606 of the call block record associated with the callee identified by the contents of the username field 604 in FIG. 26. If the caller identifier matches a block pattern stored in the field 606, block 610 directs the RC processor circuit 200 to send a drop call or non-completion message to the call controller 14 and the process 250 is ended. If the caller identifier does not match a block pattern associated with the callee, block 612 directs the RC processor circuit 200 to determine whether or not call forwarding is required.

Referring to FIG. 28, records in the call forwarding table include a username field 614, a destination number field 616 and a sequence number field 618. The username field 614 stores a code representing a username of a subscriber with whom the call forwarding record is associated. The destination number field 616 holds a username or E.164 number representing a number to which the current call should be forwarded, and the sequence number field 618 holds an integer number indicating the order in which the username associated with the corresponding destination number field should be attempted for call forwarding. The call forwarding table may have a plurality of records for a given subscriber. The RC processor circuit 200 uses the contents of the sequence number field 618 to place the records for a given subscriber in order. As will be appreciated below, this enables the call forwarding numbers to be tried in an ordered sequence.

Referring back to FIG. 8A and referring to FIG. 28, if at block 612, the call forwarding record for the callee identified by the callee identifier contains no contents in the destination number field 616 and accordingly no contents in the sequence number field 618, then there are no call forwarding entries and the RC processor circuit 200 is directed to load the routing message buffer shown in FIG. 32 with the callee username, domain and time to live as shown at 650. The RC processor circuit 200 is then directed to block 620 in FIG. 8C. However, if there are contents in the call forwarding record as shown in FIG. 29, block 622 shown in FIG. 8A directs the RC processor circuit 200 to search the dialing profile table in the database 18 to find a dialing profile record of the type shown in FIG. 9, for the callee identified in the destination number field 616 of the first call forwarding record and to store the contents in the routing message buffer. The RC processor circuit 200 is then directed to load the contents of the domain field 260 associated with the dialing profile specified by the contents of the destination number field 616 of the first call forwarding record into the routing message buffer as shown at 652 in FIG. 32. This process is repeated for each call forwarding record associated with the callee identified by the callee identifier to add to the routing message buffer all call forwarding usernames and domains associated with the callee.

Referring to FIG. 8C, at block 620 the RC processor circuit 200 is directed to determine whether or not the user identified by the callee identifier has paid for voicemail service and this is done by checking to see whether or not a flag 630 is set in a voicemail record of the type shown in FIG. 30 in a voicemail table stored in the database 18 in FIG. 1.

Referring to FIG. 30, voicemail table records include a username field 624, a voicemail server field 626, a seconds-to-voicemail field 628 and an enabled field 630. The username field 624 stores the username of the subscriber who purchased the service. The voicemail server field 626 holds a code identifying an IP address or a fully qualified domain name (FQDN) of a voicemail server associated with the subscriber identified by the username field 624. The seconds-to-voicemail field 628 holds a code identifying the time to wait before engaging voicemail and the enable field 630 holds a code representing whether or not voice mail is enabled for the user identified by the contents of the username field 624. Therefore, referring back to FIG. 8C, at block 620 the RC processor circuit 200 finds a voicemail record as shown in FIG. 31 having username field 624 contents matching the callee identifier and examines the contents of the enabled field 630 to determine whether or not voicemail is enabled. If voicemail is enabled, then block 640 in FIG. 8C directs the RC processor circuit 200 to store the contents of the voicemail server field 626 of FIG. 31, and the contents of the seconds to voicemail field 628 of FIG. 31 in the routing message buffer as shown at 654 in FIG. 32.

Referring back to FIG. 8C, block 642 then directs the processor to get time to live (TTL) values for each route specified by the routing message according to any of a plurality of criteria such as, for example, the cost of routing and the user's account balance. These TTL values are then appended to corresponding routes already stored in the routing message buffer. Block 643 then directs the RC processor circuit 200 to store the TTL value determined at block 642 in the routing message buffer. In the routing message shown in FIG. 32, the time to live value is set at 60 seconds, for example.

Block 644 of FIG. 8C then directs the RC processor circuit 200 to store the IP address or FQDM of the current supernode in the routing message buffer as shown at 656 in FIG. 32. An exemplary routing message for a subscriber to subscriber call on the same node is thus shown in the routing message buffer shown in FIG. 32.

Subscriber to Non-Subscriber Calls

Not all calls will be subscriber-to-subscriber calls and this will be detected by the RC processor circuit 200 when it executes block 269 of FIG. 8B and does not find a DID bank table record associated with the callee in the DID bank table. This may be the case, for example, where the Emergency Response Center (ERC) is not a subscriber to the system. When this occurs, the RC processor circuit 200 is directed to block 408 in FIG. 8B which causes it to set the contents of the callee identifier buffer 209 equal to the reformatted callee identifier, i.e., the E.164 compatible number produced prior to block 263 in FIG. 8B. Block 409 then directs the RC processor circuit 200 to determine whether the emergency call flag 211 in FIG. 7 has been set. If the emergency call flag is set, block 411 in FIG. 80 directs the RC processor to search the DID bank table to attempt to locate a DID record having DID field (274, FIG. 13) contents matching the contents of the caller identifier stored in the caller ID buffer (205 in FIG. 7).

If no such DID record is found, the RC processor circuit 200 has effectively determined that the caller identifier is not associated with a pre-associated DID identifier. In this case, block 413 then directs the RC processor circuit 200 to associate a temporary DID identifier with the caller identifier by associating with the caller identifier a DID identifier from the pool of pre-determined DID identifiers. Again, this is done by creating and associating with the caller a temporary DID record of the type shown in FIG. 13.

After a temporary DID record has been created or if the caller already has a DID record, block 415 directs the RC processor circuit to store the DID number (274 in FIG. 13) in the caller ID buffer 209 in FIG. 7.

After having loaded the caller ID buffer 209 with the temporary or pre-associated DID number, or after having determined that the emergency call flag is not set, block 410 (FIG. 8B) directs the RC processor circuit 200 to initiate a process for identifying gateways to the PSTN through which the call will be established. This process begins with block 410 which directs the RC processor circuit 200 to address a master list having records of the type shown in FIG. 19.

Each master list record includes a master list ID field 500, a dialing code field 502, a country code field 504, a national sign number field 506, a minimum length field 508, a maximum length field 510, a NDD field 512, an IDD field 514 and a buffer rate field 516.

The master list ID field 500 holds a unique code such as 1019, for example, identifying the record. The dialing code field 502 holds a predetermined number pattern that the RC processor circuit 200 uses at block 410 in FIG. 8B to find the master list record having a dialing code matching the first few digits of the reformatted callee identifier. The country code field 504 holds a number representing the country code associated with the record and the national sign number field 506 holds a number representing the area code associated with the record. (It will be observed that the dialing code 502 is a combination of the contents of the country code field 504 and the national sign number field 506.) The minimum length field 508 holds a number representing the minimum number of digits that can be associated with the record and the maximum length field 510 holds a number representing the maximum number of digits in a number with which the record may be compared. The NDD field 512 holds a number representing an access code used to make a call within the country specified by the country code 504 and IDD field 514 holds a number representing the international prefix needed to dial a call from the country indicated by the country code.

Thus, for example, a master list record may have a format as shown in FIG. 20 with exemplary field contents as shown.

Referring back to FIG. 8B, using the country code and area code portions of the reformatted callee identifier that has been formatted for compatibility with the E.164 standard, block 410 directs the RC processor circuit 200 to find a master list record such as the one shown in FIG. 20 having a dialing code that matches the country code and area code of the reformatted callee identifier held in the callee identifier buffer 209. Thus, in this example, the RC processor circuit 200 might find a master list record having an ID field with the number 1019. This number may be also referred to as a route ID number. Thus, a route ID number is found in the master list record associated with a predetermined number pattern in the reformatted callee identifier.

After execution of block 410 in FIG. 8B, the process 250 continues as shown in FIG. 8D. Referring to FIG. 8D, block 412 directs the RC processor circuit 200 to use the route ID number determined at block 410 to locate at least one supplier record identifying a supplier operable to supply a communications link for this route. To do this, block 412 directs the RC processor circuit 200 to search a supplier ID table having records of the type shown in FIG. 21.

Referring to FIG. 21, supplier list records include a supplier ID field 540, a master list ID field 542, an optional prefix field 544, a route identifier field 546, a NDD/IDD rewrite field 548 and a rate field 550. The supplier ID field 540 holds a code identifying the name of the supplier and the master list ID field 542 holds a code for associating the supplier record with the master list record. The prefix field 544 optionally holds a string used to identify the supplier traffic and the route identifier field 546 holds an IP address of a gateway operated by the supplier indicated by the supplier ID field 540. The NDD/IDD rewrite field 548 holds a code and the rate field 550 holds a code indicating the cost per second to the system operator to use the route through the gateway specified by the contents of the route identifier field 546. Exemplary supplier records are shown in FIGS. 22, 23 and 24 for Telus, Shaw and Sprint, respectively, for example.

Referring back to FIG. 8D, at block 412 the RC processor circuit 200 finds all supplier records that contain the master list ID found at block 410 of FIG. 8B.

Block 560 of FIG. 8D directs the RC processor circuit 200 to begin to produce routing messages. To do this, the RC processor circuit 200 loads a routing message buffer as shown in FIG. 25 with a supplier prefix of the least costly supplier where the least costly supplier is determined from the rate fields 550 of the records associated with respective suppliers.

Referring to FIGS. 22-24, in the embodiment shown, the supplier “Telus” has the lowest number in the rate field 550 and therefore the prefix 4973 associated with that supplier is loaded into the routing message buffer shown in FIG. 25 first. At block 562, the prefix 4973 is then delimited by the number sign (as defined by the contents of the delimiter field 356 in the routing message format 352 in FIG. 15) and the reformatted callee identifier is next loaded into the routing message buffer after the delimiter. Then, the contents of the route identifier field 546 of the record associated with the supplier Telus are added to the message after an @ sign delimiter and then block 564 in FIG. 8D directs the RC processor circuit 200 to get a TTL value (algorithm not shown), which in this embodiment may be 3600 seconds, for example. Block 566 of FIG. 8D then directs the RC processor circuit 200 to append this TTL value to the contents already in the routing message buffer shown in FIG. 25. Block 567 of FIG. 80 then directs the processor circuit to append the contents of the caller ID buffer 205 of FIG. 7 to the contents already in the routing message buffer shown in FIG. 25. Accordingly, the first part of the routing message is shown generally at 570 in FIG. 25.

Referring back to FIG. 8D, block 571 directs the RC processor circuit 200 back to block 560 and causes it to repeat blocks 560, 562, 564, 566 and 567 for each successive supplier until the routing message buffer is loaded with information pertaining to each supplier. Thus, the second portion of the routing message is shown at 572 in FIG. 25 and this second portion relates to the second supplier identified by the record shown in FIG. 23 and referring back to FIG. 25, the third portion of the routing message is shown at 574 which is associated with a third supplier as indicated by the supplier record shown in FIG. 24. Consequently, referring to FIG. 25, the routing message buffer holds a routing message identifying a plurality of different suppliers able to provide gateways to establish a communication link to permit the caller to contact the callee. Each of the suppliers is identified, in succession, according to rate contained in the rate field 550 of the supplier list record shown in FIG. 21, in this embodiment. Other criteria for determining the order in which suppliers are listed in the routing message may include preferred supplier priorities which may be established based on service agreements, for example.

Response to Routing Message

Referring back to FIG. 1, the routing message of the type shown in FIG. 16, 16A, 25 or 32, is received at the call controller 14. It will be recalled that the call controller 14 already has the original SIP invite message shown in FIG. 3. Referring to FIG. 4, the program memory 104 of the call controller 14 includes a routing-to-media relay routine depicted generally at 122.

Referring to FIG. 38, the routing to media relay routine 122 directs the processor to participate in a process for establishing audio paths. Assume the call is directed to the ERC.

As a first step in the process for establishing audio paths, a message 1100 is sent from the call controller 14 to the media relay 17, the message including the call ID, the caller telephone IP address and UDP port as determined from the caller IP address field 67 and caller UDP port field 69 in the SIP Invite message 59 shown in broken outline.

In response, the media relay (MR) 17 sends a confirmation message 1102 back to the call controller 14, the message including a media relay IP address (192.168.2.10) and UDP port number (22123) defining a callee socket that the media relay will use to establish an audio path to the ERC telephone or a PSTN gateway to the ERC, where the Emergency Response Center is only available through the PSTN

The call controller 14 then sends a SIP Invite message 1104 of type shown in FIG. 3 to the callee telephone 15 (or PSTN gateway), to advise the callee that telephone of the socket the media relay expects to use for audio communication with the caller telephone. The SIP invite message includes the caller and callee identifiers (60 and 62), the call ID (65) and the media relay 17 IP address (192.168.2.10) and the media relay UDP port number (22123) assigned to the callee socket as received from the confirmation message 1102. The caller identifier may be that which was associated with the caller at blocks 413 in FIG. 8D or block 285 in FIG. 8A, for example, or may be the DID associated with the caller as determined from a DID record already associated with the caller. Such caller identifier, as obtained from the routing message, may be used as calling line identification (CLID) information and may be caused to appear on a display of the callee telephone, which is particularly advantageous where the callee telephone is one at an ERC. Such CLID information provides an ERC operator with callback information, enabling the operator to call back the caller who made the emergency call. Since the temporarily assigned DID records persist for some time after the emergency call has taken place, the ERC operator can call back the person who made the emergency call during a period of time after the emergency call is terminated. In this embodiment, assume the callee telephone identifies its socket as IP address 192.168.3.10 and UDP port 33123.

The callee (ERC) telephone 33 of FIG. 1 (or PSTN gateway) stores the media relay 17 IP address (192.168.2.10) and assigned UDP port number (22123) and configures itself to create a socket for an audio path between the media relay. Referring to FIGS. 1 and 38 the callee telephone 15 (or PSTN gateway) then sends a SIP OK message 1106 back to the call controller 14, the message including the CALL ID, the callee IP address (192.168.3.10) and UDP port number (33123) to advise the call controller of the socket at which it expects to use for audio communications with the media relay 17.

The call controller 14 then sends a message 1108 to the media relay 17 including the IP address (192.168.3.10) and UDP port number (33123) identifying the socket at that the callee telephone 15 (or PSTN gateway) that is to be used for audio communications with the media relay. The media relay 17 then creates a caller socket identified by IP address 192.168.2.10 and UDP port number 22125 and creates an internal bridge for relaying audio traffic between the caller socket (192.168.2.10: 22125) and the callee socket (192.168.2.10: 22123).

The media relay 17 then sends a message 1110 including the call ID and the IP address (192.168.2.10) and UDP port number (22125) identifying the caller socket that the media relay assigned to the caller telephone 12, back to the call controller 14 to indicate that the caller and callee sockets have been established and that the call can proceed.

The call controller 14 then sends a SIP OK message 1112 to the caller telephone 12 to indicate that the call may now proceed. The SIP OK message includes the caller and callee usernames, the call ID and the IP address (192.168.2.10) and UDP port number (22125) identifying the caller socket at the media relay 17.

Alternatively, referring back to FIG. 1, if the routing message is of a type that identifies a domain associated with another supernode in the system, the call controller 14 may communicate with a different media relay (for example 27) adapted to establish the above-mentioned links between separate media relays associated with respective supernodes, where the IP network links are provided by the communications medium 23.

In the case of an emergency call, the routing message is unlikely to identify a domain other than that of the caller.

In the case of a regular, non-emergency call, if the routing message is of the type shown in FIG. 25 where there are a plurality of suppliers available, the process proceeds as described above with the exception that instead of communicating with the callee telephone directly, the call controller 14 communicates with a gateway provided by a supplier. If a SIP OK message is not received back from the first gateway, the processor is directed to send the SIP Invite message 1104 to a gateway of the next indicated supplier. For example, the call controller 14 sends the SIP Invite message 1104 to the first supplier, in this case Telus, to determine whether or not Telus is able to handle the call. If Telus does not send back an OK message 1106 or sends a message indicating that it is not able to handle the call, the call controller proceeds to send a SIP Invite message 1104 to the next supplier, in this case Shaw. The process is repeated until one of the suppliers responds with a SIP OK message 1106 indicating that it is available to carry the call and the process proceeds as shown in connection with messages 1108, 1110 and 1112.

Referring to FIG. 2, in response to receiving the SIP OK message 1112 at the network interface 48, the microprocessor 32 of the caller telephone 12 stores the media relay IP address (192.168.2.10) and UDP port number (22125) identifying the caller socket at the media relay in an audio path IP address buffer 47 in the temporary memory 40. The microprocessor 32 is now ready to transfer audio signals and from the handset and the media relay 17 using the sockets created above.

Referring back to FIG. 1, if the call is a regular, non-emergency call, and the call controller 14 receives a message of the type shown in FIG. 32, i.e., a type which has one call forwarding number and/or a voicemail number, the call controller attempts to establish a call (using message 1104 in FIG. 38) to the callee telephone 15 and if no call is established (i.e., message 1106 in FIG. 38 is not received) within the associated TTL (3600 seconds), the call controller 14 attempts to establish a call with the next user identified in the call routing message. This process is repeated until all call forwarding possibilities have been exhausted after respective times to live, in which case an audio path is established with the voicemail server 19 identified in the routing message. The voicemail server 19 sends message 1106 in response to receipt of message 1104 and functions as described above in connection with the callee telephone 15 to permit an outgoing audio message provided by the voicemail server to be heard by the caller and to permit the caller to record an audio message on the voicemail server.

When audio paths are established, a call timer (not shown) maintained by the call controller logs the start date and time of the call and logs the call ID and an identification of the route (i.e., audio path IP address) for later use in billing, for example.

Terminating the Call

In the event that either the caller or the callee (or callee via the PSTN) terminates a call, the telephone of the terminating party (or gateway associated with the terminating party) sends a SIP Bye message to the call controller 14. An exemplary SIP Bye message is shown at 900 in FIG. 33 and includes a caller field 902, a callee field 904 and a call ID field 906. The caller field 902 holds the caller username, the callee field 904 holds a PSTN compatible number or username, and the call ID field 906 holds a unique call identifier field of the type shown in the caller ID field 65 of the SIP Invite message shown in FIG. 3.

Thus, when terminating a regular non-emergency call, such as initiated by the Vancouver subscriber to the Calgary subscriber for example, referring to FIG. 34, a SIP Bye message is produced as shown generally at 908 and the caller field 902 holds a username identifying the Vancouver caller, in this case 2001 1050 8667, the callee field 904 holds a username identifying the Calgary callee, in this case 2001 1050 2222, and the callee ID field 906 holds the code FA10 @ 192.168.0.20, which is the call ID for the call.

The SIP Bye message shown in FIG. 34 is received at the call controller 14 and the call controller executes a process as shown generally at 910 in FIG. 35. The process includes a first block 912 that directs the call controller circuit 100 to copy the caller, callee and call ID field contents from the SIP Bye message 900 shown in FIG. 33 received from the terminating party to corresponding fields of an RC Call Stop message buffer (not shown). Block 914 then directs the call controller circuit 100 to copy the call start time from the call timer and to obtain a Call Stop time from the call timer. Block 916 then directs the call controller to calculate a communication session time by determining the difference in time between the call start time and the call stop time. This communication session time is then stored in a corresponding field of the RC Call Stop message buffer. Block 918 then directs the call controller circuit 100 to copy the route identifier from the call log. An RC Call Stop message produced as described above is shown generally at 1000 in FIG. 36. An RC Call Stop message specifically associated with the call made to the Calgary callee is shown generally at 1020 in FIG. 37.

Referring to FIG. 36, the RC Call Stop message includes a caller field 1002, callee field 1004, a call ID field 1006, an account start time field 1008, an account stop time field 1010, a communication session time 1012 and a route field 1014. The caller field 1002 holds a username, the callee field 1004 holds a PSTN-compatible number or system number, the call ID field 1006 holds the unique call identifier received from the SIP Invite message shown in FIG. 3, the account start time field 1008 holds the date and start time of the call, the account stop time field 1010 holds the date and time the call ended, the account session time field 1012 holds a value representing the difference between the start time and the stop time, in seconds, and the route field 1014 holds the IP address for the communications link that was established.

Referring to FIG. 37, an exemplary RC stop call message for the Calgary callee is shown generally at 1020. In this example the caller field 1002 holds the username 2001 1050 8667 identifying the Vancouver caller and the callee field 1004 holds the username 2001 1050 2222 identifying the Calgary callee. The contents of the call ID field 1006 are FA10 @ 192.168.0.20. The contents of the accounting start time field 1008 are 2006-12-30 12:12:12 and the contents of the accounting stop time field are 2006-12-30 12:12:14. The contents of the communication session time field 1012 are 2 to indicate 2 seconds call duration and the contents of the route field are 72.64.39.58.

Referring back to FIG. 35, after having produced an RC Call Stop message, block 920 directs the call controller circuit 100 to send the RC stop message contained in the RC Call Stop message buffer to the routing controller 16.

The routing controller 16 receives the Call Stop message and an RC Call Stop message process is invoked at the RC to deal with charges and billing for the call.

Block 922 directs the call controller circuit 100 to send a Bye message back to the party that did not terminate the call.

Block 924 then directs the call controller circuit 100 to send a “Bye” message of the type shown in FIG. 33 to the media relay 17 to cause the media relay to delete the caller and callee sockets it established for the call and to delete the bridge between the sockets.

While specific embodiments of the invention have been described and illustrated, such embodiments should be considered illustrative of the invention only and not as limiting the invention as construed in accordance with the accompanying claims. 

What is claimed is:
 1. A process for routing emergency communications having a caller identifier associated with a caller and a callee identifier associated with a callee, the process comprising: using the caller identifier to identify a dialing profile associated with the caller, said dialing profile including an emergency call identifier and an emergency response center identifier associated with the caller; when said callee identifier matches said emergency call identifier: producing a routing message for receipt by a call controller operable to cause a route to be established between the caller and an emergency response center, said routing message having a first portion and a second portion, said first portion including said emergency response center identifier; and initiating a search of a direct inward dial (DID) database for a DID record associating a DID identifier with said caller; and when said search finds a DID record associating a DID identifier with said caller, causing said second portion to include said DID identifier from said DID record; and when said search does not find a DID record associating a DID identifier with said caller, associating a temporary DID identifier with said caller and causing said second portion to include said temporary DID identifier.
 2. The process of claim 1, wherein causing said second portion to include said DID identifier from said DID record comprises copying said DID identifier from said DID record to a DID identifier buffer.
 3. The process of claim 2, wherein causing said second portion to include said DID identifier from said DID record comprises causing the contents of said DID identifier buffer to define said DID identifier in said second portion of said routing message.
 4. The process of claim 1, wherein associating said temporary DID identifier with said caller comprises associating with said caller identifier a DID identifier from a pool of pre-determined DID identifiers.
 5. The process of claim 4, wherein associating said DID identifier from said pool comprises associating a temporary DID record with said caller, said temporary DID record having a DID identifier field populated with said DID identifier from said pool.
 6. The process of claim 5, wherein associating said DID identifier from said pool comprises copying said DID identifier from said temporary DID record to a DID identifier buffer.
 7. The process of claim 6, wherein causing said second portion of said routing message to include said temporary DID identifier comprises causing the contents of said DID identifier buffer to define said temporary DID identifier in said routing message.
 8. The process of claim 5, further comprising canceling said temporary DID record after a pre-defined period of time.
 9. The process of claim 1, wherein producing said routing message comprises copying an emergency response center identifier from said emergency response center identifier field of said dialing profile associated with said caller to a routing message buffer such that the emergency response center identifier is included in the routing message.
 10. The process of claim 1, wherein producing said routing message further comprises causing said routing message to specify a maximum call time for said emergency call, said maximum call time being greater than an average call time.
 11. The process of claim 1, further comprising receiving a routing request message including said caller identifier and said callee identifier.
 12. An apparatus for routing emergency communications having a caller identifier associated with a caller and a callee identifier associated with a callee, the apparatus comprising: means for using the caller identifier to identify a dialing profile associated with the caller, said dialing profile including an emergency call identifier and an emergency response center identifier associated with the caller; means for determining whether said callee identifier matches said emergency call identifier: means for producing a routing message, when said callee identifier matches said emergency call identifier, said routing message being prepared for receipt by a call controller operable to cause a route to be established between the caller and an emergency response center, said routing message having a first portion and a second portion, said first portion including said emergency response center identifier; means for initiating a search of a direct inward dial (DID) database for a DID record associating a DID identifier with said caller; means for causing said second portion to include said DID identifier from said DID record when said search finds a DID record associating a DID identifier with said caller; means for associating a temporary DID identifier with said caller when said search does not find a DID record associating a DID identifier with said caller; and means for causing said second portion to include said temporary DID identifier.
 13. The apparatus of claim 12, wherein said means for using the caller identifier comprises means for accessing a dialing profile database of dialing profiles associated with respective subscribers to said system to identify said dialing profile associated with said caller.
 14. The apparatus of claim 13, further comprising a DID identifier buffer and wherein said means for causing said second portion to include said DID identifier from said DID record comprises means for copying said DID identifier from said DID record to said DID identifier buffer.
 15. The apparatus of claim 14, wherein said means for causing said second portion to include said DID identifier from said DID record comprises means for causing the contents of said DID identifier buffer to define said DID identifier in said second portion.
 16. The apparatus of claim 12, further comprising means for accessing a pool of pre-determined DID identifiers and wherein said means for associating said temporary DID identifier with said caller comprises means for associating a DID identifier from said pool of pre-determined DID identifiers with said caller identifier.
 17. The apparatus of claim 16, wherein said means for associating said DID identifier from said pool comprises means for associating a temporary DID record with said caller, said temporary DID record having a DID identifier field populated with said DID identifier from said pool.
 18. The apparatus of claim 17, wherein said means for associating said temporary DID identifier comprises means for copying said DID identifier from said temporary DID record to a DID identifier buffer.
 19. The apparatus of claim 18, wherein said means for causing said second portion to include said temporary DID identifier comprises means for causing the contents of said DID identifier buffer to define said temporary DID identifier in said second portion.
 20. The apparatus of claim 17, further comprising means for canceling said temporary DID record after a period of time.
 21. The apparatus of claim 12, further comprising a routing message buffer and means for copying the contents of said emergency response center identifier field of said dialing profile associated with said caller to said routing message buffer such that said contents of said emergency response center identifier field are included as said emergency response center identifier in said routing message.
 22. The apparatus of claim 12, wherein said means for producing said routing message further comprises means for causing said routing message to include a maximum call time for said emergency call, said maximum call time being greater than an average call time.
 23. The apparatus of claim 12, further comprising means for receiving a routing request message including said caller identifier and said callee identifier.
 24. An apparatus for routing emergency communications having a caller identifier associated with a caller and a callee identifier associated with a callee, the apparatus comprising a processor circuit operably configured to: use the caller identifier to identify a dialing profile associated with the caller, said dialing profile including an emergency call identifier and an emergency response center identifier associated with the caller; when said callee identifier matches said emergency call identifier: produce a routing message for receipt by a call controller operable to cause a route to be established between the caller and an emergency response center, said routing message having a first portion and a second portion, said first portion including said emergency response center identifier; and initiate a search of a direct inward dial (DID) database for a DID record associating a DID identifier with said caller and; when said search finds a DID record associating a DID identifier with said caller, cause said second portion to include said DID identifier from said DID record; and when said search does not find a DID record associating a DID identifier with said caller, associate a temporary DID identifier with said caller and cause said second portion to include said temporary DID identifier.
 25. The apparatus of claim 24, wherein said processor circuit is operably configured to copy said DID identifier from said DID record to a DID identifier buffer.
 26. The apparatus of claim 25, wherein said processor circuit is operably configured to cause the contents of said DID identifier buffer to define said DID identifier in said routing message.
 27. The apparatus of claim 24, wherein said processor circuit is operably configured to associate with said caller identifier a DID identifier from a pool of pre-determined DID identifiers.
 28. The apparatus of claim 27, wherein said processor circuit is operably configured to associate a temporary DID record with the caller, said temporary DID record having a DID identifier field populated with said DID identifier from said pool.
 29. The apparatus of claim 28, wherein said processor circuit is operably configured to copy said temporary DID identifier from said temporary DID record to a DID identifier buffer.
 30. The apparatus of claim 29, wherein said processor circuit is operably configured to cause the contents of said DID identifier buffer to define said temporary DID identifier in said routing message.
 31. The apparatus of claim 28, wherein said processor circuit is operably configured to cancel said temporary DID record after a period of time.
 32. The apparatus of claim 24, further comprising a routing message buffer and wherein said processor circuit is operably configured to copy an emergency response center identifier from said dialing profile associated with said caller to said routing message buffer such that said emergency response center identifier is included in said routing message.
 33. The apparatus of claim 24, wherein said processor circuit is operably configured to cause said routing message to include a maximum call time for said emergency call, said maximum call time being greater than an average call time.
 34. The apparatus of claim 24, wherein said processor circuit is operably configured to receive a routing request message including said caller identifier and said callee identifier.
 35. A non-transitory computer readable medium encoded with codes for directing a processor circuit to route emergency communications having a caller identifier associated with a caller and a callee identifier associated with a callee, the computer readable medium being encoded with codes for directing the processor circuit to: use the caller identifier to identify a dialing profile associated with the caller, said dialing profile including an emergency call identifier and an emergency response center identifier associated with the caller; produce a routing message, when said callee identifier matches said emergency call identifier, for receipt by a call controller operable to cause a route to be established between the caller and an emergency response center, said routing message having a first portion and a second portion, said first portion including said emergency response center identifier; initiate a search of a direct inward dial (DID) database for a DID record associating a DID identifier with said caller; cause said second portion to include said DID identifier from said DID record when said search finds a DID record associating a DID identifier with said caller; and associate a temporary DID identifier with said caller and cause said second portion to include said temporary DID identifier when said search does not find a DID record associating a DID identifier with said caller. 